﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using SameGame.Presentation;

namespace SameGame
{
	/// <summary>
	/// Interaction logic for ScoreView.xaml
	/// </summary>
	public partial class ScoreView : UserControl, IBoardScoreView
	{
		IBoardScorePresenter _presenter;

		public ScoreView(IBoardScorePresenter presenter)
		{
			InitializeComponent();
			this.Loaded += ScoreView_Loaded;

			_presenter = presenter;
		}

		void ScoreView_Loaded(object sender, RoutedEventArgs e)
		{
			_presenter.View = this;
		}

		public int Score
		{
			get
			{
				return int.Parse(txbkScore.Text);
			}
			set
			{
				txbkScore.Text = value.ToString();
			}
		}
	}
}
